package com.tbs.parkingsaleapp.UI.Adapters.Selectors;

import com.tbs.parkingsaleapp.Http.JsonData.ParkResult;
import com.tbs.parkingsaleapp.SystemManager.SystemDataMananger;

public class LikeSelector implements SystemDataMananger.ISelectPark{
private boolean[] fliter={false,false,false,false,false,false};
public LikeSelector()
        {
        }
        public void setFliter(int index,boolean value)
        {
            fliter[index]=value;
        }
        public boolean getFliter(int index)
        {
            return fliter[index];
        }

    @Override
    public boolean Select(ParkResult parkResult) {
    int i=0;
    boolean[] arr=parkResult.getTrait().raw();
        for (boolean b:fliter
             ) {
            if(arr[i++]&&b)
                return true;
        }
        return false;
    }
}
